docs: clarify dual-memory architecture (fixes #344)#367
docs: clarify dual-memory architecture (fixes #344)#367jlin53882 wants to merge 2 commits intoCortexReach:masterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcdb9b8cf8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
index.ts
Outdated
| if (_initialized) { | ||
| api.logger.debug("memory-lancedb-pro: register() called again — skipping re-init (idempotent)"); | ||
| return; | ||
| } | ||
| _initialized = true; |
There was a problem hiding this comment.
Defer init flag until registration succeeds
Setting _initialized = true before parsing config and creating runtime components makes registration non-recoverable: any thrown error on first startup leaves the module permanently “initialized,” so later register() calls silently no-op. In environments that retry plugin startup (or reload after fixing config), the plugin stays disabled until process restart.
Useful? React with 👍 / 👎.
index.ts
Outdated
| // recallMode: "full" (default when autoRecall=true) | "summary" (L0 only) | "adaptive" (intent-based) | "off" | ||
| const recallMode = config.recallMode || "full"; | ||
| if (config.autoRecall === true && recallMode !== "off") { | ||
| if (config.autoRecall === true) { |
There was a problem hiding this comment.
Respect recallMode when deciding auto-recall enablement
This condition now enables auto-recall whenever autoRecall === true, but the previously supported recallMode: "off" path is no longer checked. Existing configs that keep autoRecall on but set recallMode to disable injection will now inject memories unexpectedly, changing prompt contents and behavior for deployed users.
Useful? React with 👍 / 👎.
| model: config.embedding.model || "text-embedding-3-small", | ||
| baseURL: config.embedding.baseURL, | ||
| dimensions: config.embedding.dimensions, | ||
| omitDimensions: config.embedding.omitDimensions, | ||
| taskQuery: config.embedding.taskQuery, |
There was a problem hiding this comment.
Forward omitDimensions into embedder config
The embedder is constructed without omitDimensions, so users who configured embedding.omitDimensions=true lose that behavior and will start sending dimensions again. For OpenAI-compatible backends that reject the dimensions field, embedding calls fail, which breaks memory writes and retrieval flows relying on embeddings.
Useful? React with 👍 / 👎.
Fixes Applied for Your 3 P1 Review IssuesApplied all 3 fixes directly to this PR: P1 #1: Defer
|
|
To use Codex here, create an environment for this repo. |
AliceLJY
left a comment
There was a problem hiding this comment.
Thanks for the dual-memory architecture docs — the table and explanation are clear and much needed! One scoping concern before we merge:
The cli.ts change adds a new import-markdown command (125 lines) — that's a code feature, not documentation. Could you split it into a separate feat: PR so it can get proper review of the CLI error handling and file path resolution? The README addition and startup warning log can merge as-is.
Also noticed this PR and #356 both delete the same symbols from index.ts (runCompaction, normalizeAutoCaptureText, etc.) — these will conflict at merge time. Is there a shared refactor commit underlying both? If so, it would be cleaner to land that as a dedicated PR first.
713b6a6 to
738ad76
Compare
Add two improvements addressing Issue CortexReach#344: 1. README: add Dual-Memory Architecture section explaining Plugin Memory (LanceDB) vs Markdown Memory distinction 2. index.ts: log dual-memory warning on plugin startup Refs: CortexReach#344
738ad76 to
389750c
Compare
PR Split — closed by this updateThis PR has been split into two:
Changes in this update:
@AliceLJY please review #367 when ready — it should be clean to merge now. |
PR Split UpdateThis PR has been split into two separate pull requests:
Changes in this update
Related PRs
@AliceLJY please review #367 when ready — it should be clean to merge now. |
|
Thanks for splitting this out and rebasing — the dual-memory architecture section is clear and will help users a lot. A few things before we can merge:
The dual-memory table and startup log look great as-is. Once these items are resolved this should be ready to go! 🙏 |
…own reference, restore removed README sections - Restore cli.ts (was accidentally deleted, all CLI commands preserved) - Remove import-markdown command reference from dual-memory section (lives in PR CortexReach#426) - Restore beta.10 version banner and OpenClaw 2026.3+ badge - Restore Auto-recall timeout tuning FAQ section Ref: CortexReach#367
…own reference, restore removed README sections - Restore cli.ts (was accidentally deleted, all CLI commands preserved) - Remove import-markdown command reference from dual-memory section (lives in PR CortexReach#426) - Restore beta.10 version banner and OpenClaw 2026.3+ badge - Restore Auto-recall timeout tuning FAQ section Ref: CortexReach#367
|
Hi @AliceLJY — all review items have been addressed in the latest push:
Please re-review when you have a moment 🙏 |
Summary
Addresses Issue #344: Dual-memory model causes confusing UX — users expect Markdown memories to be recallable, but they aren't.
Adds three improvements:
1. README: Dual-Memory Architecture section
Explains the distinction between Plugin Memory (LanceDB) and Markdown Memory, with a clear table and usage guidance.
2. index.ts: Startup warning log
Logs a human-readable warning on every plugin initialization.
3. cli.ts: import-markdown command
px memory-lancedb-pro memory-pro import-markdown\ — migrate Markdown memories into the plugin store for semantic recall.
Test results
Gateway log after restart:
\
01:23:46 [memory-lancedb-pro] memory_recall queries the plugin store (LanceDB), not MEMORY.md...
01:23:49 memory-lancedb-pro: initialized successfully (embedding: OK, retrieval: OK, mode: hybrid, FTS: enabled)
\\
Closes #344